<template>
	<view class="button">
		<button class="button_btn" :disabled="disabled" @click="click">
			<rui-icons :icon="icon" v-if="icon"></rui-icons> {{text}}
		</button>
	</view>
	
</template>

<script setup>
	defineProps({
		text: String, 
		icon: String,
		disabled: Boolean
	})
	
	const emits = defineEmits(['click'])
	const click = () => {
		emits('click')
	}
</script>

<style lang="scss" scoped>
	.button{
		margin: 20rpx;
		&_btn{
			background: var(--color);
			color: #fff;
		}
	}
</style>